﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:find="clr-namespace:DeepEarth.Toolkit.Controls">
    <Style TargetType="find:FindControlToolPanel">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="find:FindControlToolPanel">
                    <Grid x:Name="LayoutRoot">
                        <Grid >
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="25" />
                                <ColumnDefinition Width="25" />
                                <ColumnDefinition Width="25" />
                            </Grid.ColumnDefinitions>
                            <Image x:Name="PART_LoadingIndicator" Source="/DeepEarth.Toolkit.Controls.Find;component/Images/loading.png" Grid.Column="1" Height="20" Visibility="Collapsed"></Image>
                            <Button x:Name="PART_ClearFind" Grid.Column="2" Height="20" ToolTipService.ToolTip="Clear Results">
                                <Image Source="/DeepEarth.Toolkit.Controls.Find;component/Images/clear.png"></Image>
                            </Button>
                            <TextBox x:Name="PART_SearchBox" Grid.Column="0" Width="200" FontSize="12" Height="25" Text="{Binding SearchTerm, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, UpdateSourceTrigger=Default}">
                                
                            </TextBox>
                            <Button Command="{Binding TriggerSearchCommand, RelativeSource={RelativeSource TemplatedParent}}" x:Name="PART_TriggerFind" Grid.Column="1" Height="20" ToolTipService.ToolTip="Search" >
                                <Image Source="/DeepEarth.Toolkit.Controls.Find;component/Images/search.png"></Image>
                            </Button>
                            <ToggleButton Height="20" Grid.Column="4" ToolTipService.ToolTip="Hide/Show Results" IsChecked="{Binding AreSearchResultsVisible, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
                                <Image Source="/DeepEarth.Toolkit.Controls.Find;component/Images/27.png"></Image>
                            </ToggleButton>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>